<?php
namespace app\admin\logic;

use app\admin\model\SiteConfigModel;
use app\admin\model\SystemModel;
use think\Cache;
use think\Config;

class SystemLogic extends BaseLogic
{
    /**
     * 获取当前网站设置
     */
    public function get_site_config(){
        $config = false;
        if($config === false){
            $model = new SystemModel();
            $data = $model->get_site_config();
            foreach ($data as $value){
                $config[$value['alias']] = $value['value'];
            }
        }
        Config::set('system',$config);
    }

}
